<!-- 模板 -->
<template>
  <header>
    <div class="search">
      <label for="search">
        <div :class="flag === 1 ? 'tips' : 'tips disnone'">
          <i class="iconfont search-icon"></i>
          <span>三大招甩掉字幕看美剧</span>
        </div>
      </label>
      <input
        type="text"
        id="search"
        @focus="
          () => {
            this.flag = 0
          }
        "
        @blur="
          () => {
            this.flag = 1
          }
        "
      />
    </div>
  </header>
</template>
<script>
// import request from '../utils/request.js'
export default {
  name: '',
  data() {
    return {
      flag: 1,
    }
  },
  props: [],
  components: {},
  computed: {},
  filters: {},
  methods: {},
  created() {},
  mounted() {},
}
</script>
<style lang="less" scoped>
// @import url(); 引入公共css类
.search {
  color: #666;
  position: relative;
  .tips {
    position: absolute;
    display: flex;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    img {
      width: 0.28rem;
      margin-right: 0.2rem;
    }
    i {
      display: flex;
      margin-right: 0.1rem;
      line-height: 0.32rem;
      align-items: flex-end;
      font-size: 0.28rem;
    }
    span {
      font-size: 0.28rem;
    }
  }
  .disnone {
    display: none;
  }
  input {
    outline: none;
    border: 0;
    background: #f5f5f5;
    margin: 0.2rem;
    width: calc(100vw - 0.4rem);
    font-size: 0.28rem;
    padding: 0.2rem;
    border-radius: 5rem;
    text-align: center;
  }
}
</style>
